package com.cloud.feignclient;

import com.cloud.mall.goods.TbItem;
import com.cloud.mall.goods.dto.ItemStockDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/7/5 14:52
 * @Desc
 * @Remarks
 */
@Component
@FeignClient("GPMALL-GOODS")
public interface GoodsFeignClient {

    //    扣减库存
    @RequestMapping("/goods/tb-item/decreaseGoodsAmount")
    boolean decreaseGoodsAmount(@RequestBody List<ItemStockDto> itemStockDtos);

    //    根据ID查询商品信息
    @RequestMapping("/goods/tb-item/listByIds")
    List<TbItem> listByIds(@RequestBody List<Long> ids);
}
